package com.rimi.controller;


import com.rimi.bean.Menu;
import com.rimi.bean.User;
import com.rimi.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 * InnoDB free: 11264 kB 前端控制器
 * </p>
 *
 * @author sky
 * @since 2018-06-06
 */
@Controller
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @RequestMapping("/index")
    public String index(Model model){
        List<Menu> list = menuService.selectList(null);
        model.addAttribute("menus",list);
        return "index";
    }

}

